<!--conf
<sample>
              <product version="1.4" edition="std"/>
                     <modifications>
                            <modified date="070101"/>
                     </modifications>
               </sample>
 --> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>Refresh grid from XML</title>
	
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
</head>
<style>
    .even{
        background-color:#E6E6FA;
    }
    .uneven{
        background-color:#F0F8FF;
    }

</style>
<body>
	<h1>Refresh</h1>
	<p>Refresh operation doesn't recreate grid, it just updates data in it, as result the state of grid is fully preserved.</p>
	<div id="gridbox" style="width:600px; height:270px; background-color:white;"></div>
	
<br>
<div><a href="#" onClick="mygrid.clearAll(); mygrid.loadXML('../common/first.xml');">Reload grid - classic way</a></div>
<div><a href="#" onClick="mygrid.loadXML('../common/second.xml');">Reload grid - clear grid from XML</a></div>
<div><a href="#" onClick="mygrid.updateFromXML('../common/third.xml');">Reload grid - refresh data only </a></div>
<br>

<script>
	mygrid = new dhtmlXGridObject('gridbox');
	mygrid.setImagePath("../../../codebase/imgs/");
	mygrid.setHeader("Sales,edtxt,ed,Price,In Store,Shipping,Bestseller,Date of Publication");
	mygrid.setInitWidths("50,150,100,80,80,80,80,200")
	mygrid.setColAlign("right,left,left,right,center,left,center,center")
	mygrid.setColTypes("dyn,edtxt,ed,price,ch,co,ra,ro");
    mygrid.getCombo(5).put(2,2);
	mygrid.setColSorting("int,str,str,int,str,str,str,date")
	mygrid.init();
	mygrid.setSkin("dhx_skyblue")
	mygrid.enableAlterCss("even","uneven");
	mygrid.loadXML("../common/grid.xml");
</script>

</body>
</html>
